﻿package mortal.game.view.mail.view
{
    import com.mui.controls.*;
    import com.mui.display.*;
    import mortal.game.view.common.*;

    public class MTextAreaBox extends GSprite
    {
        private var _ta:GTextArea;
        private var _bg:ScaleBitmap;
        private var _text:String;
        private var _styleName:String;
        private var _bgStyleName:String;

        public function MTextAreaBox()
        {
            this.isHideDispose = true;
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this._ta = UIFactory.textArea("", 0, 0, 300, 300, this);
            this._bg = UIFactory.bg(this._ta.x, this._ta.y, this._ta.width, this._ta.height, this, "InputBg");
            this.addChildAt(this._bg, 0);
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this._text = null;
            this._styleName = null;
            this._bgStyleName = null;
            if (this._bg)
            {
                this._bg.dispose(param1);
            }
            if (this._ta)
            {
                this._ta.dispose(param1);
                this._ta = null;
            }
            return;
        }// end function

        override public function dispose(param1:Boolean = true) : void
        {
            super.dispose(param1);
            if (this._bg)
            {
                this._bg.dispose(param1);
            }
            if (this._ta)
            {
                this._ta.dispose(param1);
                this._ta = null;
            }
            return;
        }// end function

        public function get bg() : ScaleBitmap
        {
            return this._bg;
        }// end function

        public function get ta() : GTextArea
        {
            return this._ta;
        }// end function

    }
}
